package com.xxq.gulimall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xxq.common.utils.PageUtils;
import com.xxq.gulimall.product.entity.AttrAttrgroupRelationEntity;
import com.xxq.gulimall.product.entity.AttrEntity;
import com.xxq.gulimall.product.entity.AttrGroupEntity;

import java.util.List;
import java.util.Map;

/**
 * 属性分组
 *
 * @author xxq
 * @email 1607903138@qq.com
 * @date 2022-04-28 20:20:14
 */
public interface AttrGroupService extends IService<AttrGroupEntity> {

    PageUtils queryPage(Map<String, Object> params);

    PageUtils queryByCatelogId(Map<String, Object> params, Long catelogId);

    List<AttrEntity> getRelation(Long attrGroupId);

    void saveRelation(List<AttrAttrgroupRelationEntity> entityList);

    List<AttrGroupEntity> getGroupWithAttr(Long catelogId);

    // 删除属性与分组的关联关系
    void deleteRelation(List<AttrAttrgroupRelationEntity> entityList);

    // 获取分类下所有分组&关联属性
    AttrGroupEntity getByIdWithCatelogPath(Long attrGroupId);
}

